package com.zl.protocol;



import java.math.BigDecimal;
import java.math.BigInteger;

/**
 * @author chenzy
 * @date 2020-06-22
 */
public class NumberUtil {
    private NumberUtil() {
    }
    /*字节数据转成十六进制字符串*/
    public static String byte2Hex(byte data) {
        var result = Integer.toHexString(data & 0xFF).toUpperCase();
        return result.length() ==2 ? result:"0".concat(result);
    }
}
